Add configurable inline-comment whitespace rule and enable for Bash#2
Draft
notfoundzzz wants to merge 4 commits intozhl/209_7/fix-bash-langfrom
Draft
Conversation
a05a5b2 to
2f5bafa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#comments with a configurable parser option to avoid ad-hoc per-language code and make the rule data-driven.$#or${#var}are not mis-highlighted as comments in Bash.Description
src/Data/Parser/inline_comment_parser.hppandsrc/Data/Parser/inline_comment_parser.cpp(m_require_space_beforeandset_require_space_before).can_parse()whenm_require_space_beforeis true and the previous character is not whitespace ininline_comment_parser.cpp.space_beforecomment feature inprog_language_rep::customize_commentinsrc/System/Language/prog_language.cppso languages can enable the rule via parser features and removed the previous Bash-specific#handling inget_color.(space_before "true")to the Bash language config inTeXmacs/plugins/bash/progs/code/bash-lang.scmunder thecommentparser feature.Testing
Codex Task